import request from "@/utils/request";

// 查询付款列表
export function listCsmPayM(query) {
  return request({
    url: "/machine/csmPayM/list",
    method: "get",
    params: query,
  });
}

// 查询付款详细
export function getCsmPayM(id) {
  return request({
    url: "/machine/csmPayM/" + id,
    method: "get",
  });
}

// 新增付款
export function addCsmPayM(data) {
  return request({
    url: "/machine/csmPayM",
    method: "post",
    data: data,
  });
}

// 修改付款
export function updateCsmPayM(data) {
  return request({
    url: "/machine/csmPayM",
    method: "put",
    data: data,
  });
}

// 删除付款
export function delCsmPayM(id) {
  return request({
    url: "/machine/csmPayM/" + id,
    method: "delete",
  });
}

// 查询采购付款单号
export function getPayDocumentNo() {
  return request({
    url: "/machine/csmPayM/getPayDocumentNo",
    method: "get",
  });
}

// 查询应付欠款金额
export function getPayPriceBySupplier(query) {
  return request({
    url: "/machine/csmPayM/getPayPriceBySupplier",
    method: "get",
    params: query,
  });
}

// 审核
export function auditPayM(data) {
  return request({
    url: "/machine/csmPayM/audit",
    method: "put",
    data: data,
  });
}
